<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'polls-form',
	'enableAjaxValidation'=>false,
)); ?>
<?php 
	$objCompetation = $query;
     // echo "<pre>";
	 // print_r($objCompetation);exit;
	?>
	
<?php   if (!empty($objCompetation))
	{ 
	//$arranswers =$objCompetation->compt_option;
	$arranswers = explode(",",$objCompetation->compt_option);
	$objCompetationID = $objCompetation->comptID;
	$objCompetationcount = $objCompetation->count;
	$objhtmloptions = $objCompetation->html_options;
	$objdescription = $objCompetation->description;	
    $objcategory = $objCompetation->category;
	
	
	 	
?>

 <h1><?php print_r($objCompetation->compt_question);?></h1>
   <input type="hidden" id="Competationid_hidden" name="Competationid" value="<?php echo $objCompetationID;?>">
	  <input type="hidden" id="Competationcount_hidden" name="surveycount" value="<?php echo $objCompetationcount ;?>">
	
	  <input type="hidden" id="htmloptions" name="htmloptions" value="<?php echo $objhtmloptions; ?>">
	     <?php 
        

       if($objhtmloptions==1)
	   {
	  
         echo CHtml::RadioButtonList('compt_option',$modelCompetationanswer->compt_answer,$arranswers,array('separator'=>' ')); 
	   }

      else
	  {
	     echo Chtml::textField('compt_option',$modelCompetationanswer->compt_answer);
	  }?>
   
	  	<div class="row buttons">
		<?php //echo CHtml::submitButton('Submit',array('submit'=>'pollAnswer')); ?>
		<?php echo CHtml::submitButton('Submit', array('submit'=>ApplicationConfig::getURL("", "Competationdisplay", "competationAnswer"))); ?>

	   </div>
	<?php }else
	   { 
	    echo "sorry no Competations found";
	   }?>  
<?php $this->endWidget(); ?>
</div><!-- form -->